import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/userManage',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/userManage.vue'),
                    meta: { title: '用户管理' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/chat',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/chat.vue'),
                    meta: { title: '聊天咨询' }
                },
            ]
        },
        {
            path: '/Examine',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '管理文件' },
            children:[
                {
                    path: '/audition',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/audition.vue'),
                    meta: { title: '身份认证' }
                },
                {
                    path: '/auditing-item',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/auditing-item.vue'),
                    meta: { title: '人脸比对' }
                },
                {
                    path: '/activity',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/activity.vue'),
                    meta: { title: '服务审核' }
                },
                {
                    path: '/ICH',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/ICH.vue'),
                    meta: { title: '学习审核' }
                },
                {
                    path: '/Goods',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/Goods.vue'),
                    meta: { title: '商品管理' }
                },
                {
                    path: '/Order',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/Order.vue'),
                    meta: { title: '订单管理' }
                },
                {
                    path: '/TimeCoin',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/TimeCoin.vue'),
                    meta: { title: '交易明细' }
                },
                {
                    path: '/detailsActivity',
                    name:'detailsActivity',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/detailsActivity.vue'),
                    meta: { title: '活动详情' }
                },
                {
                    path: '/OrderDetails',
                    name:'OrderDetails',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/OrderDetails.vue'),
                    meta: { title: '订单详情' }
                },
                {
                    path: '/Block',
                    name:'Block',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/Block.vue'),
                    meta: { title: '区块链' }
                },
                {
                    path: '/Community',
                    name:'Community',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/community.vue'),
                    meta: { title: '社区管理' }
                },
                {
                    path: '/Model',
                    name:'Model',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/Model.vue'),
                    meta: { title: '模型管理' }
                },
                {
                    path: '/Supplier',
                    name:'Supplier',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/Examine/Supplier.vue'),
                    meta: { title: '供应商管理' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
